<html lang="fr">
<!-- tete du site zaka -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Cassandra</title>
</head>
<!-- corps du site -->
<body>
<p>Banane</p>
<?php
// Connecteur PDO_CASSANDRA
$db = new PDO('cassandra:host=192.168.84.148;port=9160');
echo ($db);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);

// Création de l'espace de travail
$db->exec ("CREATE KEYSPACE mytest with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor=1;");

// Utilisation
$db->exec ("USE mytest");

//création de la column family
$db->exec ("CREATE COLUMNFAMILY users (uid varchar PRIMARY KEY, name varchar, last_name varchar);");

//insertions
$request = $db->prepare ("INSERT INTO users (uid, name, last_name) VALUES (:id, :name, :last_name);");
$request->execute (array (':id' =>'xbgf12kj', ':name' => 'stéphane', ':last_name' => 'raymond'));

$request = $db->prepare ("INSERT INTO users (uid, name, last_name) VALUES (:id, :name, :last_name);");
$request->execute (array (':id' =>'hjsbv56s', ':name' => 'fabien', ':last_name' => 'callard'));

$request = $db->prepare ("INSERT INTO users (uid, name, last_name) VALUES (:id, :name, :last_name);");
$request->execute (array (':id' =>'nbx45Aqd', ':name' => 'toto'.$t, ':last_name' => 'au bistro'));

//requete de sélection
$request = $db->prepare ("SELECT * FROM users");
$request->execute ();
?>
    Içi on va  crée une collumn ajouter des utilisteur et les selectionner.
    et normalement on va les afficher içi : <?php echo($request->fetchAll()); ?>
</body>